﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>HotelApp</title>
    <link rel="stylesheet" type="text/css" href="css/desktop.css" />
    <link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
    <!-- GC -->
    <!-- <x-compile> -->
    <!-- <x-bootstrap> -->
    <script type="text/javascript" src="../scripts/ext-all.js"></script>
    <script type="text/javascript" src="../scripts/ext-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../kindeditor/kindeditor.js"></script>
    <!--    <script type="text/javascript" src="../Scripts/include-ext.js"></script>
    <script type="text/javascript" src="../Scripts/options-toolbar.js"></script>-->
    <!-- </x-bootstrap> -->
    <script type="text/javascript">

        Ext.Ajax.request({
            url: '../HotelWebService.asmx/ValidLoginUser',
            success: function (response, opts) {
                eval('var result =' + response.responseText + ';');
                {
                    if (result.success) {
                        g_userName = result.errors.clientCode;
                        Ext.Loader.setPath({
                            'Ext.ux.desktop': 'js',
                            MyDesktop: ''
                        });

                        Ext.require('MyDesktop.App');

                        var myDesktopApp;
                        Ext.onReady(function () {
                            myDesktopApp = new MyDesktop.App();
                        });
                    }
                    else {
                        window.location.href = "../Login.html";
                    }
                }
            },
            failure: function (response, opts) {
                Ext.Msg.alert(AdviceLang.AlertInfo, AdviceLang.LoginFailed);
            }
        });

        
    </script>
    <!-- </x-compile> -->
</head>
<body>
</body>
</html>
